Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Upgrade to Hibernate ORM 7 #41310

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft

Conversation

yrodiere
Copy link
Member

@yrodiere yrodiere commented Jun 19, 2024

This is WIP to upgrade Quarkus to Hibernate ORM 7 -- which isn't stable yet.

Based on #41359, which must be merged first. => Done

Opening the PR as draft for anyone needing to build something on top of it.

Status / next steps:

@quarkus-bot quarkus-bot bot added area/dependencies Pull requests that update a dependency file area/hibernate-orm Hibernate ORM area/hibernate-reactive area/persistence OBSOLETE, DO NOT USE labels Jun 21, 2024
@yrodiere yrodiere changed the title Upgrade to Hibernate ORM 7 [WIP] Upgrade to Hibernate ORM 7 Jun 25, 2024
@yrodiere yrodiere force-pushed the orm7 branch 2 times, most recently from 85327ca to 8d25fb0 Compare June 28, 2024 14:28
@quarkus-bot quarkus-bot bot added area/documentation area/panache area/spring Issues relating to the Spring integration labels Jun 28, 2024
@gsmet
Copy link
Member

gsmet commented Sep 4, 2024

Should we try to coordinate the Jakarta EE 11 updates?

@yrodiere
Copy link
Member Author

yrodiere commented Sep 5, 2024

Should we try to coordinate the Jakarta EE 11 updates?

Quarkus definitely should plan for that, yes. I don't know the full implications for Quarkus, but I think at least CDI, Narayana and Validator (so probably EL too?) will need to be upgraded before or at the same time as we upgrade to Hibernate ORM 7.0. As well as Search and Reactive, of course.
Upgrading every Jakarta component to Jakarta 11 would probably be simpler than trying to mix Jakarta 10 and 11, but that's up to you.

Fair warning though:

  1. ORM 7.0 is not ready yet -- there's no clear date set for the release at the moment.
  2. I'm only just getting back to this, trying to get things to compile ( ✔️ ) and basic tests to pass ( ❌ ), so that I can report any bugs upstream.

I'll set a reminder to ping you when I have a clearer view of what works and what doesn't in Quarkus itself.

@quarkus-bot quarkus-bot bot added area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/jdbc Issues related to the JDBC extensions labels Sep 16, 2024
Copy link

github-actions bot commented Sep 16, 2024

🎊 PR Preview 63a1fea has been successfully built and deployed to https://quarkus-pr-main-41310-preview.surge.sh/version/main/guides/

  • Images of blog posts older than 3 months are not available.
  • Newsletters older than 3 months are not available.

@yrodiere
Copy link
Member Author

I identified the Kotlin failures as a bug in hibernate-models: hibernate/hibernate-models#99
Looking into the other failures...

@yrodiere
Copy link
Member Author

The XML mapping issue seems caused by https://hibernate.atlassian.net/browse/HHH-18662.

@yrodiere
Copy link
Member Author

Alright, I think I did all I could at this point. I will need new Beta releases of Hibernate ORM / Search / Reactive to go further.

First because there's no reason not to (we're not testing the behavior
for unmapped attributes), and second to work around a bug in Hibernate
ORM 7.0 alphas/betas: https://hibernate.atlassian.net/browse/HHH-18662
…ersistenceProvider

Not strictly necessary, but doesn't hurt and might allow more changes in
the next commits.
Because:

1. We currently disallow this for identifier generators only
   through a custom initializer for the identifier generator
   factory service, but that service is disappearing in Hibernate
   ORM 7.0.0.Beta1, leaving us only the setting `hibernate.cdi.extensions`.
   to disallow CDI for identifier generators -- and anything else
   that impacts metadata creation.
2. This is needed for quarkusio#40897,
   which will move more of metadata creation to build time -- where CDI
   is just not available.
3. Implementations of affected components needing access to CDI at
   runtime (so not during metadata creation) can still do so by
   calling `Arc.container()` to retrieve the relevant beans.
…equired dependencies

With Derby moving to hibernate-community-dialects, Quarkus will need to
add this dependency automatically.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dependencies Pull requests that update a dependency file area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/documentation area/hibernate-orm Hibernate ORM area/hibernate-reactive area/jdbc Issues related to the JDBC extensions area/panache area/persistence OBSOLETE, DO NOT USE area/spring Issues relating to the Spring integration
Projects
Development

Successfully merging this pull request may close these issues.

2 participants